﻿using DotNetCore.CAP;
using DotNetCore.CAP.Internal;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Ongoal.Quotation.Cap
{
    public class MessageSubscribeAttribute : CapSubscribeAttribute
    {
        /// <summary>
        /// 分布式事务MessageSubscribe
        /// </summary>
        /// <param name="name"></param>
        /// <param name="isPartial"></param>
        public MessageSubscribeAttribute(string name, bool isPartial = false)
            : base(name, isPartial)
        {
        }

        /// <summary>
        /// ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return Name;
        }
    }

    /// <summary>
    /// 分布式事务FromMessage
    /// </summary>
    [AttributeUsage(AttributeTargets.Parameter)]
    public class FromMessageAttribute : FromCapAttribute
    {
    }

    /// <summary>
    /// 分布式事务Header
    /// </summary>
    public class MessageHeader : CapHeader
    {
        public MessageHeader(IDictionary<string, string?> dictionary) : base(dictionary)
        {
        }
    }
}
